#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ(AUTOCONF_VERSION)
AC_INIT(jian, 0.1.0, eyjian@qq.com)
AM_INIT_AUTOMAKE(jian, 0.1.0)

AC_CONFIG_SRCDIR([config.h.in])
AM_CONFIG_HEADER([config.h])

if test "$prefix" = "NONE" ; then
	prefix="$HOME"
fi
# Checks for programs.
${CXXFLAGS="-g"}
AC_PROG_CXX
AC_PROG_CC

# Checks for libraries.
# FIXME: Replace `main' with a function in `-ldl':
AC_CHECK_LIB([dl], [main])
# FIXME: Replace `main' with a function in `-lm':
AC_CHECK_LIB([m], [main])
# FIXME: Replace `main' with a function in `-lpthread':
AC_CHECK_LIB([pthread], [main])

# Checks for header files.
#AC_FUNC_ALLOCA
#AC_HEADER_DIRENT
#AC_HEADER_STDC
#AC_HEADER_SYS_WAIT

# Checks for typedefs, structures, and compiler characteristics.
#AC_C_CONST
#AC_TYPE_UID_T
#AC_C_INLINE
#AC_TYPE_MODE_T
#AC_TYPE_OFF_T
#AC_TYPE_PID_T
#AC_TYPE_SIZE_T
#AC_HEADER_TIME
#AC_STRUCT_TM
#AC_C_VOLATILE
#AC_CHECK_TYPES([ptrdiff_t])

# Checks for library functions.
#AC_FUNC_CLOSEDIR_VOID
#AC_FUNC_FORK
#AC_PROG_GCC_TRADITIONAL
#AC_FUNC_LSTAT
#AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
#AC_FUNC_MALLOC
#AC_FUNC_MEMCMP
#AC_FUNC_MMAP
#AC_FUNC_REALLOC
#AC_FUNC_SELECT_ARGTYPES
#AC_TYPE_SIGNAL
#AC_FUNC_STAT
#AC_FUNC_STRERROR_R
#AC_FUNC_STRNLEN
#AC_FUNC_VPRINTF
#AC_CHECK_FUNCS([alarm bzero dup2 ftruncate gethostbyname gettimeofday inet_ntoa localtime_r memmove mempcpy memset munmap select socket stpcpy strcasecmp strchr strcspn strdup strerror strncasecmp strrchr strspn strstr strtol strtoul strtoull tzset])

AC_PROG_LIBTOOL

lt_major=1
lt_revision=0
lt_age=0
AC_SUBST(lt_major)
AC_SUBST(lt_revision)
AC_SUBST(lt_age)

#AC_ARG_ENABLE (feature,help-string [,action-if-given [,action-if-not-given]])

#AM_CONDITIONAL(bit_32,test "x`getconf LONG_BIT`"="x32")

AC_CONFIG_FILES([
		Makefile
		shell/Makefile
		conf/Makefile
		loader/Makefile
		util/Makefile
		sys/Makefile
		net/Makefile
		time_keeper/Makefile
		gtf/Makefile
		http_parser/Makefile
		plugin/Makefile
		plugin/plugin_log4cxx/Makefile
		plugin/plugin_tinyxml/Makefile
		httpd/Makefile
		receiver/Makefile
		dispatcher/Makefile
		observer/Makefile
		scheduler/Makefile
		service/Makefile
		cluster_util/Makefile
		container/Makefile
		])
AC_OUTPUT
